#include <iostream>
#include <list>
#include <queue>
using namespace std;

int main()
{
	int n, m; cin >> n >> m;
	vector<char> arr(2*n, 'G');
	for (int i = 0, count = 0; count < n; count++) {
		int j = 0;
		while (j < m) {
			if (arr[i] == 'G') j++;
			if(j < m) i = (i + 1) % (2 * n);
		}
		arr[i] = 'B';
	}
	for (int i = 1; i <= 2 * n; i++) {
		cout << arr[i - 1];
		if (i % 50 == 0 && i != 2 * n) cout << endl;
	}
	return 0;
}